package com.gaohe.help.service.impl;

import java.util.List;
import com.gaohe.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.help.mapper.FmHelpReceiveMapper;
import com.gaohe.help.domain.FmHelpReceive;
import com.gaohe.help.service.IFmHelpReceiveService;

/**
 * 订单接单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class FmHelpReceiveServiceImpl implements IFmHelpReceiveService 
{
    @Autowired
    private FmHelpReceiveMapper fmHelpReceiveMapper;

    /**
     * 查询订单接单
     * 
     * @param helpReceiveId 订单接单主键
     * @return 订单接单
     */
    @Override
    public FmHelpReceive selectFmHelpReceiveByHelpReceiveId(Long helpReceiveId)
    {
        return fmHelpReceiveMapper.selectFmHelpReceiveByHelpReceiveId(helpReceiveId);
    }

    /**
     * 查询订单接单列表
     * 
     * @param fmHelpReceive 订单接单
     * @return 订单接单
     */
    @Override
    public List<FmHelpReceive> selectFmHelpReceiveList(FmHelpReceive fmHelpReceive)
    {
        return fmHelpReceiveMapper.selectFmHelpReceiveList(fmHelpReceive);
    }

    /**
     * 新增订单接单
     * 
     * @param fmHelpReceive 订单接单
     * @return 结果
     */
    @Override
    public int insertFmHelpReceive(FmHelpReceive fmHelpReceive)
    {
        fmHelpReceive.setCreateTime(DateUtils.getNowDate());
        return fmHelpReceiveMapper.insertFmHelpReceive(fmHelpReceive);
    }

    /**
     * 修改订单接单
     * 
     * @param fmHelpReceive 订单接单
     * @return 结果
     */
    @Override
    public int updateFmHelpReceive(FmHelpReceive fmHelpReceive)
    {
        fmHelpReceive.setUpdateTime(DateUtils.getNowDate());
        return fmHelpReceiveMapper.updateFmHelpReceive(fmHelpReceive);
    }

    /**
     * 批量删除订单接单
     * 
     * @param helpReceiveIds 需要删除的订单接单主键
     * @return 结果
     */
    @Override
    public int deleteFmHelpReceiveByHelpReceiveIds(Long[] helpReceiveIds)
    {
        return fmHelpReceiveMapper.deleteFmHelpReceiveByHelpReceiveIds(helpReceiveIds);
    }

    /**
     * 删除订单接单信息
     * 
     * @param helpReceiveId 订单接单主键
     * @return 结果
     */
    @Override
    public int deleteFmHelpReceiveByHelpReceiveId(Long helpReceiveId)
    {
        return fmHelpReceiveMapper.deleteFmHelpReceiveByHelpReceiveId(helpReceiveId);
    }
}
